﻿using GraphQL.Types;
using GraphQLSample.Domain.Services;
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphQLSample.Domain.Schema
{
    public class UserQuery
        : ObjectGraphType
    {
        public UserQuery(IUserService userService)
        {
            Name = nameof(UserQuery);
            Description = "";

            Field<ListGraphType<UserType>>("users", resolve: context => userService.GetAsync().Result);
        }
    }
}
